3.708 \(\int \frac{\cos ^8(c+d x) \sin ^2(c+d x)}{a+a \sin (c+d x)} \, dx\)

Optimal. Leaf size=139 \[ -\frac{\cos ^9(c+d x)}{9 a d}+\frac{\cos ^7(c+d x)}{7 a d}-\frac{\sin (c+d x) \cos ^7(c+d x)}{8 a d}+\frac{\sin (c+d x) \cos ^5(c+d x)}{48 a d}+\frac{5 \sin (c+d x) \cos ^3(c+d x)}{192 a d}+\frac{5 \sin (c+d x) \cos (c+d x)}{128 a d}+\frac{5 x}{128 a} \]

[Out]

(5*x)/(128*a) + Cos[c + d*x]^7/(7*a*d) - Cos[c + d*x]^9/(9*a*d) + (5*Cos[c + d*x]*Sin[c + d*x])/(128*a*d) + (5
*Cos[c + d*x]^3*Sin[c + d*x])/(192*a*d) + (Cos[c + d*x]^5*Sin[c + d*x])/(48*a*d) - (Cos[c + d*x]^7*Sin[c + d*x
])/(8*a*d)

________________________________________________________________________________________

Rubi [A]  time = 0.196626, antiderivative size = 139, normalized size of antiderivative = 1., number of steps used = 9, number of rules used = 6, integrand size = 29, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.207, Rules used = {2839, 2568, 2635, 8, 2565, 14} \[ -\frac{\cos ^9(c+d x)}{9 a d}+\frac{\cos ^7(c+d x)}{7 a d}-\frac{\sin (c+d x) \cos ^7(c+d x)}{8 a d}+\frac{\sin (c+d x) \cos ^5(c+d x)}{48 a d}+\frac{5 \sin (c+d x) \cos ^3(c+d x)}{192 a d}+\frac{5 \sin (c+d x) \cos (c+d x)}{128 a d}+\frac{5 x}{128 a} \]

Antiderivative was successfully verified.

[In]

Int[(Cos[c + d*x]^8*Sin[c + d*x]^2)/(a + a*Sin[c + d*x]),x]

[Out]

(5*x)/(128*a) + Cos[c + d*x]^7/(7*a*d) - Cos[c + d*x]^9/(9*a*d) + (5*Cos[c + d*x]*Sin[c + d*x])/(128*a*d) + (5
*Cos[c + d*x]^3*Sin[c + d*x])/(192*a*d) + (Cos[c + d*x]^5*Sin[c + d*x])/(48*a*d) - (Cos[c + d*x]^7*Sin[c + d*x
])/(8*a*d)

Rule 2839

Int[((cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((d_.)*sin[(e_.) + (f_.)*(x_)])^(n_.))/((a_) + (b_.)*sin[(e_.) + (f_
.)*(x_)]), x_Symbol] :> Dist[g^2/a, Int[(g*Cos[e + f*x])^(p - 2)*(d*Sin[e + f*x])^n, x], x] - Dist[g^2/(b*d),
Int[(g*Cos[e + f*x])^(p - 2)*(d*Sin[e + f*x])^(n + 1), x], x] /; FreeQ[{a, b, d, e, f, g, n, p}, x] && EqQ[a^2
 - b^2, 0]

Rule 2568

Int[(cos[(e_.) + (f_.)*(x_)]*(b_.))^(n_)*((a_.)*sin[(e_.) + (f_.)*(x_)])^(m_), x_Symbol] :> -Simp[(a*(b*Cos[e
+ f*x])^(n + 1)*(a*Sin[e + f*x])^(m - 1))/(b*f*(m + n)), x] + Dist[(a^2*(m - 1))/(m + n), Int[(b*Cos[e + f*x])
^n*(a*Sin[e + f*x])^(m - 2), x], x] /; FreeQ[{a, b, e, f, n}, x] && GtQ[m, 1] && NeQ[m + n, 0] && IntegersQ[2*
m, 2*n]

Rule 2635

Int[((b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> -Simp[(b*Cos[c + d*x]*(b*Sin[c + d*x])^(n - 1))/(d*n),
x] + Dist[(b^2*(n - 1))/n, Int[(b*Sin[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1] && Integer
Q[2*n]

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 2565

Int[(cos[(e_.) + (f_.)*(x_)]*(a_.))^(m_.)*sin[(e_.) + (f_.)*(x_)]^(n_.), x_Symbol] :> -Dist[(a*f)^(-1), Subst[
Int[x^m*(1 - x^2/a^2)^((n - 1)/2), x], x, a*Cos[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n - 1)/2]
 &&  !(IntegerQ[(m - 1)/2] && GtQ[m, 0] && LeQ[m, n])

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rubi steps

\begin{align*} \int \frac{\cos ^8(c+d x) \sin ^2(c+d x)}{a+a \sin (c+d x)} \, dx &=\frac{\int \cos ^6(c+d x) \sin ^2(c+d x) \, dx}{a}-\frac{\int \cos ^6(c+d x) \sin ^3(c+d x) \, dx}{a}\\ &=-\frac{\cos ^7(c+d x) \sin (c+d x)}{8 a d}+\frac{\int \cos ^6(c+d x) \, dx}{8 a}+\frac{\operatorname{Subst}\left (\int x^6 \left (1-x^2\right ) \, dx,x,\cos (c+d x)\right )}{a d}\\ &=\frac{\cos ^5(c+d x) \sin (c+d x)}{48 a d}-\frac{\cos ^7(c+d x) \sin (c+d x)}{8 a d}+\frac{5 \int \cos ^4(c+d x) \, dx}{48 a}+\frac{\operatorname{Subst}\left (\int \left (x^6-x^8\right ) \, dx,x,\cos (c+d x)\right )}{a d}\\ &=\frac{\cos ^7(c+d x)}{7 a d}-\frac{\cos ^9(c+d x)}{9 a d}+\frac{5 \cos ^3(c+d x) \sin (c+d x)}{192 a d}+\frac{\cos ^5(c+d x) \sin (c+d x)}{48 a d}-\frac{\cos ^7(c+d x) \sin (c+d x)}{8 a d}+\frac{5 \int \cos ^2(c+d x) \, dx}{64 a}\\ &=\frac{\cos ^7(c+d x)}{7 a d}-\frac{\cos ^9(c+d x)}{9 a d}+\frac{5 \cos (c+d x) \sin (c+d x)}{128 a d}+\frac{5 \cos ^3(c+d x) \sin (c+d x)}{192 a d}+\frac{\cos ^5(c+d x) \sin (c+d x)}{48 a d}-\frac{\cos ^7(c+d x) \sin (c+d x)}{8 a d}+\frac{5 \int 1 \, dx}{128 a}\\ &=\frac{5 x}{128 a}+\frac{\cos ^7(c+d x)}{7 a d}-\frac{\cos ^9(c+d x)}{9 a d}+\frac{5 \cos (c+d x) \sin (c+d x)}{128 a d}+\frac{5 \cos ^3(c+d x) \sin (c+d x)}{192 a d}+\frac{\cos ^5(c+d x) \sin (c+d x)}{48 a d}-\frac{\cos ^7(c+d x) \sin (c+d x)}{8 a d}\\ \end{align*}

Mathematica [B]  time = 9.54328, size = 479, normalized size = 3.45 \[ -\frac{-5040 d x \sin \left (\frac{c}{2}\right )+1512 \sin \left (\frac{c}{2}+d x\right )-1512 \sin \left (\frac{3 c}{2}+d x\right )-1008 \sin \left (\frac{3 c}{2}+2 d x\right )-1008 \sin \left (\frac{5 c}{2}+2 d x\right )+672 \sin \left (\frac{5 c}{2}+3 d x\right )-672 \sin \left (\frac{7 c}{2}+3 d x\right )+504 \sin \left (\frac{7 c}{2}+4 d x\right )+504 \sin \left (\frac{9 c}{2}+4 d x\right )+336 \sin \left (\frac{11 c}{2}+6 d x\right )+336 \sin \left (\frac{13 c}{2}+6 d x\right )-108 \sin \left (\frac{13 c}{2}+7 d x\right )+108 \sin \left (\frac{15 c}{2}+7 d x\right )+63 \sin \left (\frac{15 c}{2}+8 d x\right )+63 \sin \left (\frac{17 c}{2}+8 d x\right )-28 \sin \left (\frac{17 c}{2}+9 d x\right )+28 \sin \left (\frac{19 c}{2}+9 d x\right )+2520 \cos \left (\frac{c}{2}\right ) (c-2 d x)-1512 \cos \left (\frac{c}{2}+d x\right )-1512 \cos \left (\frac{3 c}{2}+d x\right )-1008 \cos \left (\frac{3 c}{2}+2 d x\right )+1008 \cos \left (\frac{5 c}{2}+2 d x\right )-672 \cos \left (\frac{5 c}{2}+3 d x\right )-672 \cos \left (\frac{7 c}{2}+3 d x\right )+504 \cos \left (\frac{7 c}{2}+4 d x\right )-504 \cos \left (\frac{9 c}{2}+4 d x\right )+336 \cos \left (\frac{11 c}{2}+6 d x\right )-336 \cos \left (\frac{13 c}{2}+6 d x\right )+108 \cos \left (\frac{13 c}{2}+7 d x\right )+108 \cos \left (\frac{15 c}{2}+7 d x\right )+63 \cos \left (\frac{15 c}{2}+8 d x\right )-63 \cos \left (\frac{17 c}{2}+8 d x\right )+28 \cos \left (\frac{17 c}{2}+9 d x\right )+28 \cos \left (\frac{19 c}{2}+9 d x\right )+2520 c \sin \left (\frac{c}{2}\right )-7560 \sin \left (\frac{c}{2}\right )}{129024 a d \left (\sin \left (\frac{c}{2}\right )+\cos \left (\frac{c}{2}\right )\right )} \]

Antiderivative was successfully verified.

[In]

Integrate[(Cos[c + d*x]^8*Sin[c + d*x]^2)/(a + a*Sin[c + d*x]),x]

[Out]

-(2520*(c - 2*d*x)*Cos[c/2] - 1512*Cos[c/2 + d*x] - 1512*Cos[(3*c)/2 + d*x] - 1008*Cos[(3*c)/2 + 2*d*x] + 1008
*Cos[(5*c)/2 + 2*d*x] - 672*Cos[(5*c)/2 + 3*d*x] - 672*Cos[(7*c)/2 + 3*d*x] + 504*Cos[(7*c)/2 + 4*d*x] - 504*C
os[(9*c)/2 + 4*d*x] + 336*Cos[(11*c)/2 + 6*d*x] - 336*Cos[(13*c)/2 + 6*d*x] + 108*Cos[(13*c)/2 + 7*d*x] + 108*
Cos[(15*c)/2 + 7*d*x] + 63*Cos[(15*c)/2 + 8*d*x] - 63*Cos[(17*c)/2 + 8*d*x] + 28*Cos[(17*c)/2 + 9*d*x] + 28*Co
s[(19*c)/2 + 9*d*x] - 7560*Sin[c/2] + 2520*c*Sin[c/2] - 5040*d*x*Sin[c/2] + 1512*Sin[c/2 + d*x] - 1512*Sin[(3*
c)/2 + d*x] - 1008*Sin[(3*c)/2 + 2*d*x] - 1008*Sin[(5*c)/2 + 2*d*x] + 672*Sin[(5*c)/2 + 3*d*x] - 672*Sin[(7*c)
/2 + 3*d*x] + 504*Sin[(7*c)/2 + 4*d*x] + 504*Sin[(9*c)/2 + 4*d*x] + 336*Sin[(11*c)/2 + 6*d*x] + 336*Sin[(13*c)
/2 + 6*d*x] - 108*Sin[(13*c)/2 + 7*d*x] + 108*Sin[(15*c)/2 + 7*d*x] + 63*Sin[(15*c)/2 + 8*d*x] + 63*Sin[(17*c)
/2 + 8*d*x] - 28*Sin[(17*c)/2 + 9*d*x] + 28*Sin[(19*c)/2 + 9*d*x])/(129024*a*d*(Cos[c/2] + Sin[c/2]))

________________________________________________________________________________________

Maple [B]  time = 0.106, size = 551, normalized size = 4. \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(d*x+c)^8*sin(d*x+c)^2/(a+a*sin(d*x+c)),x)

[Out]

4/63/d/a/(1+tan(1/2*d*x+1/2*c)^2)^9-5/64/d/a/(1+tan(1/2*d*x+1/2*c)^2)^9*tan(1/2*d*x+1/2*c)+4/7/d/a/(1+tan(1/2*
d*x+1/2*c)^2)^9*tan(1/2*d*x+1/2*c)^2+191/96/d/a/(1+tan(1/2*d*x+1/2*c)^2)^9*tan(1/2*d*x+1/2*c)^3-12/7/d/a/(1+ta
n(1/2*d*x+1/2*c)^2)^9*tan(1/2*d*x+1/2*c)^4-83/32/d/a/(1+tan(1/2*d*x+1/2*c)^2)^9*tan(1/2*d*x+1/2*c)^5+12/d/a/(1
+tan(1/2*d*x+1/2*c)^2)^9*tan(1/2*d*x+1/2*c)^6+145/32/d/a/(1+tan(1/2*d*x+1/2*c)^2)^9*tan(1/2*d*x+1/2*c)^7-12/d/
a/(1+tan(1/2*d*x+1/2*c)^2)^9*tan(1/2*d*x+1/2*c)^8+20/d/a/(1+tan(1/2*d*x+1/2*c)^2)^9*tan(1/2*d*x+1/2*c)^10-145/
32/d/a/(1+tan(1/2*d*x+1/2*c)^2)^9*tan(1/2*d*x+1/2*c)^11-20/3/d/a/(1+tan(1/2*d*x+1/2*c)^2)^9*tan(1/2*d*x+1/2*c)
^12+83/32/d/a/(1+tan(1/2*d*x+1/2*c)^2)^9*tan(1/2*d*x+1/2*c)^13+4/d/a/(1+tan(1/2*d*x+1/2*c)^2)^9*tan(1/2*d*x+1/
2*c)^14-191/96/d/a/(1+tan(1/2*d*x+1/2*c)^2)^9*tan(1/2*d*x+1/2*c)^15+5/64/d/a/(1+tan(1/2*d*x+1/2*c)^2)^9*tan(1/
2*d*x+1/2*c)^17+5/64/a/d*arctan(tan(1/2*d*x+1/2*c))

________________________________________________________________________________________

Maxima [B]  time = 1.61433, size = 705, normalized size = 5.07 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^8*sin(d*x+c)^2/(a+a*sin(d*x+c)),x, algorithm="maxima")

[Out]

-1/4032*((315*sin(d*x + c)/(cos(d*x + c) + 1) - 2304*sin(d*x + c)^2/(cos(d*x + c) + 1)^2 - 8022*sin(d*x + c)^3
/(cos(d*x + c) + 1)^3 + 6912*sin(d*x + c)^4/(cos(d*x + c) + 1)^4 + 10458*sin(d*x + c)^5/(cos(d*x + c) + 1)^5 -
 48384*sin(d*x + c)^6/(cos(d*x + c) + 1)^6 - 18270*sin(d*x + c)^7/(cos(d*x + c) + 1)^7 + 48384*sin(d*x + c)^8/
(cos(d*x + c) + 1)^8 - 80640*sin(d*x + c)^10/(cos(d*x + c) + 1)^10 + 18270*sin(d*x + c)^11/(cos(d*x + c) + 1)^
11 + 26880*sin(d*x + c)^12/(cos(d*x + c) + 1)^12 - 10458*sin(d*x + c)^13/(cos(d*x + c) + 1)^13 - 16128*sin(d*x
 + c)^14/(cos(d*x + c) + 1)^14 + 8022*sin(d*x + c)^15/(cos(d*x + c) + 1)^15 - 315*sin(d*x + c)^17/(cos(d*x + c
) + 1)^17 - 256)/(a + 9*a*sin(d*x + c)^2/(cos(d*x + c) + 1)^2 + 36*a*sin(d*x + c)^4/(cos(d*x + c) + 1)^4 + 84*
a*sin(d*x + c)^6/(cos(d*x + c) + 1)^6 + 126*a*sin(d*x + c)^8/(cos(d*x + c) + 1)^8 + 126*a*sin(d*x + c)^10/(cos
(d*x + c) + 1)^10 + 84*a*sin(d*x + c)^12/(cos(d*x + c) + 1)^12 + 36*a*sin(d*x + c)^14/(cos(d*x + c) + 1)^14 +
9*a*sin(d*x + c)^16/(cos(d*x + c) + 1)^16 + a*sin(d*x + c)^18/(cos(d*x + c) + 1)^18) - 315*arctan(sin(d*x + c)
/(cos(d*x + c) + 1))/a)/d

________________________________________________________________________________________

Fricas [A]  time = 1.19651, size = 220, normalized size = 1.58 \begin{align*} -\frac{896 \, \cos \left (d x + c\right )^{9} - 1152 \, \cos \left (d x + c\right )^{7} - 315 \, d x + 21 \,{\left (48 \, \cos \left (d x + c\right )^{7} - 8 \, \cos \left (d x + c\right )^{5} - 10 \, \cos \left (d x + c\right )^{3} - 15 \, \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{8064 \, a d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^8*sin(d*x+c)^2/(a+a*sin(d*x+c)),x, algorithm="fricas")

[Out]

-1/8064*(896*cos(d*x + c)^9 - 1152*cos(d*x + c)^7 - 315*d*x + 21*(48*cos(d*x + c)^7 - 8*cos(d*x + c)^5 - 10*co
s(d*x + c)^3 - 15*cos(d*x + c))*sin(d*x + c))/(a*d)

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)**8*sin(d*x+c)**2/(a+a*sin(d*x+c)),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [A]  time = 1.17643, size = 312, normalized size = 2.24 \begin{align*} \frac{\frac{315 \,{\left (d x + c\right )}}{a} + \frac{2 \,{\left (315 \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{17} - 8022 \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{15} + 16128 \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{14} + 10458 \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{13} - 26880 \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{12} - 18270 \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{11} + 80640 \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{10} - 48384 \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{8} + 18270 \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{7} + 48384 \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{6} - 10458 \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{5} - 6912 \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{4} + 8022 \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{3} + 2304 \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} - 315 \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + 256\right )}}{{\left (\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} + 1\right )}^{9} a}}{8064 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^8*sin(d*x+c)^2/(a+a*sin(d*x+c)),x, algorithm="giac")

[Out]

1/8064*(315*(d*x + c)/a + 2*(315*tan(1/2*d*x + 1/2*c)^17 - 8022*tan(1/2*d*x + 1/2*c)^15 + 16128*tan(1/2*d*x +
1/2*c)^14 + 10458*tan(1/2*d*x + 1/2*c)^13 - 26880*tan(1/2*d*x + 1/2*c)^12 - 18270*tan(1/2*d*x + 1/2*c)^11 + 80
640*tan(1/2*d*x + 1/2*c)^10 - 48384*tan(1/2*d*x + 1/2*c)^8 + 18270*tan(1/2*d*x + 1/2*c)^7 + 48384*tan(1/2*d*x
+ 1/2*c)^6 - 10458*tan(1/2*d*x + 1/2*c)^5 - 6912*tan(1/2*d*x + 1/2*c)^4 + 8022*tan(1/2*d*x + 1/2*c)^3 + 2304*t
an(1/2*d*x + 1/2*c)^2 - 315*tan(1/2*d*x + 1/2*c) + 256)/((tan(1/2*d*x + 1/2*c)^2 + 1)^9*a))/d